namespace CodeConsult.Nordic.nRF8001.ApplicationControlInterface.Events.DataEvents
{
    public class DataReceivedEvent : AciEventBase
    {
        public const byte OpCode = 0x8C;
 
        public byte ServicePipeNo { get; set; }
        public byte[] Data { get; set; }

        protected override void DecodeFromBuffer()
        {
            var dataLen = DecodeHelper.BufferLength - 2;
            ServicePipeNo = DecodeHelper.GetByte();
            Data = DecodeHelper.GetBytes(dataLen);
        }
    }
}
